setmacro heading-indent 0 (firstnb ifelse cn (set lv 2) (ifelse cl (set lv 4) (set lv 1) right if ca (dec lv) left) indent-outline)
setmacro indent-outline 0 (setx while ca (col +1) subx if c=41 (add lv 3) calc-parcol add x \$parcol sub x \$tabstop setindcol \$x text-format gop col +1)
setmacro format-outline 0 (firstnb while ca col +2 ifelse r (tab a-[) (wright split last tab a-[ indent-body))
setmacro indent-body 0 (push pos down first while !r (pos-line \$parcol downadd first) pop pos down reformat up last join wright indent . .ct wright)
map My-return (if !t (first while !r up down) firstnb setx first while !r downadd downadd if !r (insline insline) gox)